package version1;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class Oracle {
    private static String url;
    private static String username;
    private static String password;

    public static void getParam(String fileName) throws IOException {
        Properties p1 = new Properties();
        InputStream fis1 =
                Oracle.class.getClassLoader().getResourceAsStream(fileName);
        p1.load(fis1);
        url = p1.getProperty("url");
        username = p1.getProperty("user");
        password = p1.getProperty("password");
        System.out.println("测试链接成功：" + url + username + password);
    }

    public static void main(String[] args) throws IOException {
        Oracle.getParam("db_oracle.properties");
    }
}
